d <- read.dta("/Users/hanslueders/Dropbox (IPL)/Data copy/Final data/Replication data/Raster file/RasterDataFinal.dta")
### Creating raster data set
### 1 March 2023
# Preparation -------------------------------------------------------------
### load packages
library(foreign)
library(ggplot2)
library(tidyr)
library(dplyr)
library(maptools)
library(gridExtra)
library(ggmap)
library(data.table)
library(raster)
library(rgdal)
library(sp)
library(grid)
library(gridExtra)
library(Matching)
library(stargazer)
library(lmtest)
library(sandwich)
library(xtable)
library(geosphere)
library(readxl)
library(sf)
library(stars)
library(rgeos)
d <- read.dta("/Users/hanslueders/Dropbox (IPL)/Data copy/Final data/Replication data/Raster file/RasterDataFinal.dta")
# drop Rubin protestant variables that are no longer needed
d$Rubin_prot1530 <- NULL
d$Rubin_prot1560 <- NULL
d$Rubin_prot1600 <- NULL
d$Rubin_prot1530_share <- NULL
d$Rubin_prot1560_share <- NULL
d$Rubin_prot1600_share <- NULL
